package com.eastfair.auth.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.annotation.annotation.vo.VoInfo;
import com.eastfair.annotation.model.BaseVoGroupClass;
import com.eastfair.auth.enumeration.RoleDsTypeEnum;
import com.eastfair.demand.auth.OrganizationVoGroupClass;
import com.eastfair.projectcore.vo.MenuVO;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author ligang
 * @since 2021-07-23
 */
@Data
@ApiModel(value = "Role", description = "")
public class RoleVo implements Serializable {

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long id;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private String name;

    /**
     * 角色code码
     */
    @ApiModelProperty(value = "角色code码")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private String code;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    @TableField(value = "is_enabled")
    @Excel(name = "是否生效(默认1：可用 0:不可用)")
    private Integer isEnabled;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private String description;

    /**
     * 菜单信息
     */
    @ApiModelProperty(value = "菜单信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private List<MenuVO> menuVOList;

    /**
     * 菜单id集合
     */
    @ApiModelProperty(value = "菜单id集合")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private List<Long> menuIds;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long tenantId;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private Long projectId;

    /**
     * 数据权限#{ALL:1,查看全部;THIS_LEVEL_CHILDER:2,本组以及子组;THIS_LEVEL:3,查本组;ASSIGN_LEVEL:4,查所指组和人;SELF:5,只查本人;}
     */
    @ApiModelProperty(value = "数据权限#{ALL:1,查看全部;THIS_LEVEL_CHILDER:2,本组以及子组;THIS_LEVEL:3,查本组;ASSIGN_LEVEL:4,查所指组和人;SELF:5,只查本人;}")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {OrganizationVoGroupClass.all.class})
    private RoleDsTypeEnum dsType;

    /**
     * 业务标识
     */
    @ApiModelProperty(value = "业务标识")
    private String businessTag;

    /**
     * 团队ID
     */
    @ApiModelProperty(value = "团队ID")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {BaseVoGroupClass.all.class})
    private Long teamId;
}
